﻿@{
    ViewBag.Title = "VehicleList";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>VehicleList</h2>
@section Header {
   
    <div class="ui-grid-b" style="padding:1%">
	    <div class="ui-block-a">@Html.ActionLink("Back", "MyVehicles", "Profile", null, new { data_icon = "arrow-l",  data_role="button"})</div>
	    <div class="ui-block-b"  style="text-align:center">@Html.ActionLink("Home", "Index", "Home", null, new { data_icon = "home", data_iconpos="notext", data_role="button"})</div>
	    <div class="ui-block-c" style="text-align:right"> @Html.Partial("_LogOnPartial")</div>
    </div>
}

@{
    System.Data.DataRowCollection vehicles = (System.Data.DataRowCollection)ViewData["VehicleList"];
    if (vehicles.Count > 0)
    {
        <ul data-role="listview" data-inset="true" data-filter="true">
         @foreach (System.Data.DataRow vehicle in vehicles)
         {
         <li>
             <a href="AddVehicle?vehicleId=@(vehicle["VehicleID"].ToString())">
                <h3>@(vehicle["Make"].ToString() + "-" + @vehicle["Model"].ToString())</h3>
                <p>Trim:@vehicle["Trim"].ToString()</p>				
				<p class="ui-li-aside"><strong>@vehicle["Year"].ToString()</strong></p>
              </a> 
          </li>
         }
        </ul>
    }
  }

